package com.example.gzysmartcity.ui.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.gzysmartcity.R;

import org.jetbrains.annotations.NotNull;

public class IdeaRvAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
    int size=0;
    public IdeaRvAdapter(int layoutResId,int size) {
        super(layoutResId);
        this.size=size;
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, String dataBean) {
            baseViewHolder.setText(R.id.tv_rv_idea_text,dataBean);
            if (baseViewHolder.getAdapterPosition()==size-1){
                 baseViewHolder.setImageResource(R.id.image_idea_rv,R.drawable.qidai);
            }
    }
}
